package com.tengju.user.domain.model.user;

import lombok.AllArgsConstructor;
import lombok.Value;
import lombok.experimental.NonFinal;

@Value
@AllArgsConstructor
public class ManageUser  {

    private StaffId staffId;
    private String username;
    private String password;
    private String realName;
    private String createBy;
    private String updateBy;
    @NonFinal
    private String token;

    public static ManageUser getAdminManageUser() {
        return new ManageUser(
            null,
                "admin",
                "admin"
        );
    }


    public ManageUser(StaffId staffId, String username, String realName) {
        this.staffId = staffId;
        this.username = username;
        this.realName = realName;
        this.password = null;
        this.createBy = null;
        this.updateBy = null;
    }


    public void addToken(String token) {
        this.token = token;
    }

}
